Null error when trying to get a variable in Unity